/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sistemasdistribuidos;

/**
 *
 * @author Nath
 */
public class cadastroFuncionario extends javax.swing.JDialog {

    /**
     * Creates new form cadastroFuncionario
     */
    public cadastroFuncionario(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabelMsg13 = new javax.swing.JLabel();
        jTextFieldCodigoFuncionario = new javax.swing.JTextField();
        jLabelMsg3 = new javax.swing.JLabel();
        jTextFieldNomeFuncionario = new javax.swing.JTextField();
        jLabelMsg4 = new javax.swing.JLabel();
        jFormattedTelefone = new javax.swing.JFormattedTextField();
        jFormattedCelular = new javax.swing.JFormattedTextField();
        jLabelMsg5 = new javax.swing.JLabel();
        jFormattedCPF = new javax.swing.JFormattedTextField();
        jFormattedRG = new javax.swing.JFormattedTextField();
        jLabelMsg7 = new javax.swing.JLabel();
        jLabelMsg8 = new javax.swing.JLabel();
        jLabelMsg14 = new javax.swing.JLabel();
        jButtonSalvarCadastro = new javax.swing.JButton();
        jButtonLimparDados = new javax.swing.JButton();
        jLabelMsg11 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Cadastro Funcionario");
        setAlwaysOnTop(true);

        jPanel1.setBackground(new java.awt.Color(255, 102, 0));
        jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(3, 3, 3, 3, new java.awt.Color(0, 0, 0)));

        jLabelMsg13.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        jLabelMsg13.setText("Código do Funcionário:");

        jTextFieldCodigoFuncionario.setEditable(false);
        jTextFieldCodigoFuncionario.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jTextFieldCodigoFuncionario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldCodigoFuncionarioActionPerformed(evt);
            }
        });

        jLabelMsg3.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        jLabelMsg3.setText("Nome:");

        jTextFieldNomeFuncionario.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jTextFieldNomeFuncionario.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldNomeFuncionarioMouseClicked(evt);
            }
        });

        jLabelMsg4.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        jLabelMsg4.setText("Telefone:");

        try {
            jFormattedTelefone.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        jFormattedTelefone.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jFormattedTelefone.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jFormattedTelefoneActionPerformed(evt);
            }
        });

        try {
            jFormattedCelular.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)#####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        jFormattedCelular.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jFormattedCelular.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jFormattedCelularActionPerformed(evt);
            }
        });

        jLabelMsg5.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        jLabelMsg5.setText("Celular:");

        try {
            jFormattedCPF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        jFormattedCPF.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jFormattedCPF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jFormattedCPFActionPerformed(evt);
            }
        });

        try {
            jFormattedRG.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###.###-#")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        jFormattedRG.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jFormattedRG.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jFormattedRGActionPerformed(evt);
            }
        });

        jLabelMsg7.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        jLabelMsg7.setText("RG:");

        jLabelMsg8.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        jLabelMsg8.setText("CPF:");

        jLabelMsg14.setFont(new java.awt.Font("Segoe UI", 1, 36)); // NOI18N
        jLabelMsg14.setText("Cadastro de Funcionários");

        jButtonSalvarCadastro.setBackground(new java.awt.Color(255, 255, 255));
        jButtonSalvarCadastro.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jButtonSalvarCadastro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/pata.png"))); // NOI18N
        jButtonSalvarCadastro.setText("Salvar Cadastro");
        jButtonSalvarCadastro.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButtonSalvarCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSalvarCadastroActionPerformed(evt);
            }
        });

        jButtonLimparDados.setBackground(new java.awt.Color(255, 255, 255));
        jButtonLimparDados.setFont(new java.awt.Font("Segoe UI", 0, 16)); // NOI18N
        jButtonLimparDados.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/limpar.png"))); // NOI18N
        jButtonLimparDados.setText("Limpar Dados");
        jButtonLimparDados.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButtonLimparDados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonLimparDadosActionPerformed(evt);
            }
        });

        jLabelMsg11.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N
        jLabelMsg11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/cg.png"))); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabelMsg3)
                        .addGap(18, 18, 18)
                        .addComponent(jTextFieldNomeFuncionario)
                        .addGap(17, 17, 17))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jButtonLimparDados, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButtonSalvarCadastro, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabelMsg4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jFormattedTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabelMsg7))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabelMsg5)
                                .addGap(23, 23, 23)
                                .addComponent(jFormattedCelular, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabelMsg8)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jFormattedRG, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jFormattedCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(16, 16, 16))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabelMsg13)
                        .addGap(19, 19, 19)
                        .addComponent(jTextFieldCodigoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabelMsg11)
                .addGap(104, 104, 104))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(101, 101, 101)
                .addComponent(jLabelMsg14)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addComponent(jLabelMsg14)
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelMsg13)
                    .addComponent(jTextFieldCodigoFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldNomeFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelMsg3))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonSalvarCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelMsg7)
                    .addComponent(jLabelMsg4)
                    .addComponent(jFormattedTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jFormattedRG, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonLimparDados)
                    .addComponent(jFormattedCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelMsg8)
                    .addComponent(jFormattedCelular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelMsg5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelMsg11)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTextFieldNomeFuncionarioMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldNomeFuncionarioMouseClicked
        jTextFieldNomeFuncionario.setText(null);
    }//GEN-LAST:event_jTextFieldNomeFuncionarioMouseClicked

    private void jFormattedTelefoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jFormattedTelefoneActionPerformed

    }//GEN-LAST:event_jFormattedTelefoneActionPerformed

    private void jFormattedCelularActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jFormattedCelularActionPerformed

    }//GEN-LAST:event_jFormattedCelularActionPerformed

    private void jFormattedCPFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jFormattedCPFActionPerformed

    }//GEN-LAST:event_jFormattedCPFActionPerformed

    private void jFormattedRGActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jFormattedRGActionPerformed

    }//GEN-LAST:event_jFormattedRGActionPerformed

    private void jButtonSalvarCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSalvarCadastroActionPerformed

    }//GEN-LAST:event_jButtonSalvarCadastroActionPerformed

    private void jButtonLimparDadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonLimparDadosActionPerformed

    }//GEN-LAST:event_jButtonLimparDadosActionPerformed

    private void jTextFieldCodigoFuncionarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldCodigoFuncionarioActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldCodigoFuncionarioActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(cadastroFuncionario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(cadastroFuncionario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(cadastroFuncionario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(cadastroFuncionario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                cadastroFuncionario dialog = new cadastroFuncionario(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonLimparDados;
    private javax.swing.JButton jButtonSalvarCadastro;
    public static javax.swing.JFormattedTextField jFormattedCPF;
    public static javax.swing.JFormattedTextField jFormattedCelular;
    public static javax.swing.JFormattedTextField jFormattedRG;
    public static javax.swing.JFormattedTextField jFormattedTelefone;
    private javax.swing.JLabel jLabelMsg11;
    private javax.swing.JLabel jLabelMsg13;
    private javax.swing.JLabel jLabelMsg14;
    private javax.swing.JLabel jLabelMsg3;
    private javax.swing.JLabel jLabelMsg4;
    private javax.swing.JLabel jLabelMsg5;
    private javax.swing.JLabel jLabelMsg7;
    private javax.swing.JLabel jLabelMsg8;
    private javax.swing.JPanel jPanel1;
    public static javax.swing.JTextField jTextFieldCodigoFuncionario;
    public static javax.swing.JTextField jTextFieldNomeFuncionario;
    // End of variables declaration//GEN-END:variables
}
